package com.dubito.pattern.创建型模式.工厂模式.工厂方法;

/**
 * @author liliang
 * @date 2020/8/26.
 */
public class ClientDemo {

    public static void main(String[] args) {
        // 苹果园丁工厂
        FruitGardener gardener = new AppleGardener();
        Fruit apple = gardener.factory();
        apple.plant();
        apple.grow();
        apple.harvest();

        gardener = new GrapeGardener();
        Fruit grape = gardener.factory();
        grape.plant();
        grape.grow();
        grape.harvest();

    }
}
